#!/bin/sh
# put other system startup commands here
[ `which /usr/local/etc/init.d/dbus ` ] && /usr/local/etc/init.d/dbus start 
[ `which connmand` ] && connmand -r
[ `which eeze_scanner` ] && (sleep 0.7 && eeze_scanner) &
INSTALLED=/usr/local/tce.installed
ONDEMAND=/etc/sysconfig/tcedir/ondemand
mkdir -p /usr/local/share/icons
for F in `ls -1 "$ONDEMAND"/*.img 2>/dev/null`; do
	IMG="${F##/*/}"
	APPNAME="${IMG%.img}"
	if [ ! -e "$INSTALLED"/"$APPNAME" ]; then
		[ -e /usr/local/share/applications/$APPNAME*.desktop ] || \
			cp $ONDEMAND/$APPNAME*.desktop /usr/local/share/applications 2>/dev/null
		[ -e /usr/local/share/icons/$APPNAME.png ] || \
			cp $ONDEMAND/$IMG /usr/local/share/icons/$APPNAME.png 2>/dev/null
	fi
done
